let mongoose = require('mongoose'),
    resources_posts = new mongoose.Schema({
        pid: Number,
        mobile: String,
        userName: {
            type: String,
            trim: true
        },
        recommend: {
            type: Boolean,
            default: false
        },
        title: String,
        resourcesType: {
            type: String,
            default: ''
        },
        summary: String,
        content: String,
        coverImg: String,
        browseCount: {
            type: Number,
            default: 0
        },
        thumbsCount: {
            type: Number,
            default: 0
        },
        status: {
            type: Number,
            default: 1          // 1已审核，2待审核，3未通过，4隐藏
        },
        link: String,
        createTime: {
            type: Date,
            default: Date.now
        }
    });
mongoose.model('resources_posts', resources_posts);